#ifndef EDGE_H
#define EDGE_H

#include "gisgraphlib_global.h"
#include "vertex.h"

class EdgePrivate;

class GISGRAPHLIBSHARED_EXPORT Edge
{
public:
	Edge();
	Edge(const QString &uname, const QString &vname, int length = 1);
	Edge(Vertex u, Vertex v, int length = 1);
	Edge(const Edge &other);
	bool isNull() const;
	const Vertex v() const;
	Vertex v();
	const Vertex u() const;
	Vertex u();
	uint length() const;
	void setLength(uint length);
	Edge &operator=(const Edge &other);
	bool operator==(const Edge &other) const;
private:
	EdgePrivate *d;
};

uint qHash(const Edge &e);

#endif // EDGE_H
